<template>
	<view class="tools">
		<view class="toolsWrap">
			<block>
				<view class="tool">
					<view class="item" @click="nav('/pagesA/dynamic/submit')">
						<image src=" https://www.atuanjian.com/appletStatic/static/images/u-11.png" mode=""></image>
						<text>发动态</text>
					</view>
					<view class="item" @click="nav('/pagesB/need/need')">
						<image src="https://www.atuanjian.com/appletStatic/static/images/u-09.svg" mode=""></image>
						<text>提需求</text>
					</view>
					<view class="item" @click="callPhone()">
						<image src="https://www.atuanjian.com/appletStatic/static/images/u-07.svg" mode=""></image>
						<text>客服</text>
					</view>
				</view>
			</block>
		</view>
	</view>
</template>

<script>
	export default {
		methods: {
			consult() {
				// #ifdef H5
				window.open(
					'https://p.qiao.baidu.com/cps3/chatIndex?siteToken=7e191e5d3cefa6a8c6871fce24f7376d&speedLogId=159462572466489c0_1594625724664_51120&eid=30623379&reqParam=%7B%22from%22%3A0%2C%22sid%22%3A%22-100%22%2C%22tid%22%3A%22-1%22%2C%22ttype%22%3A1%2C%22siteId%22%3A%2215082789%22%2C%22userId%22%3A%2230623379%22%2C%22pageId%22%3A0%7D'
					);
				// #endif
			},
			scrollTop() {
				uni.pageScrollTo({
					scrollTop: 0,
					duration: 500
				})
			},
			nav(url){
				uni.navigateTo({
					url:url
				})
			},
			callPhone() {
				// uni.makePhoneCall({
				// 	phoneNumber: '13022861002'
				// })
				uni.navigateTo({
					url:'/pagesB/customerService/index?status='+'kefu'
				})
			},
		}
	}
</script>

<style lang="scss">
	.tools {
		position: fixed;
		bottom: 140rpx;
		right: 20rpx;
		z-index: 1000;

		.toolsWrap {
			@include flex_style(flex-start, center, row nowrap);

			.show {
				width: 22rpx;
				height: 460rpx;
			}

			.tool {
				// background: rgba(0, 0, 0, 0.3);
				width: 80rpx;
				height: 328rpx;
				@include flex_style(space-around, center, column nowrap);

				.item {
					position: relative;
					width: 105rpx;
					height: 105rpx;
					border-radius: 50%;
					background: rgba(255, 255, 255, 0.8);
					box-shadow: 0 0 8rpx rgba(255, 187, 80, 0.2);
					@include flex_style(center, center, column nowrap);
					
					image {
						width: 38rpx;
						height: 38rpx;
						margin-bottom: 10rpx;
					}

					text {
						font-size: 20rpx;
						font-family: 苹方-简;
						font-weight: normal;
						line-height: 28rpx;
						color: #F59A23;
					}

					button {
						position: absolute;
						top: 0;
						left: 0;
						width: 100%;
						height: 100%;
						opacity: 0;
					}
				}
			}
		}
	}
</style>